package com.htu.controller;

import com.htu.po.Food;
import com.htu.service.Impl.SearchServichImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/SearchController")
public class SearchController {
    @Autowired
    private SearchServichImpl searchServich;
    @RequestMapping("/searchByKey")
    public List<Food> findBySearchKey(String searchKey){
        return searchServich.findBySearchKey(searchKey);
    }
}
